Similar to other high-speed serial interfaces operating at gigabits-per-second, USB SuperSpeed (SS) defines port-to-port protocols to ensure the reliable and efficient transfer of protocol packets across each link.
Key characteristics of SS port-to-port operation:
- Packet error checks are performed at every link.
- A packet must be successfully transferred on the current link before it is forwarded to the next link.
- These protocols are fundamentally different from the USB 2.0 Token/Data/Handshake model and are not directly comparable.
Core Features of Port-to-Port Protocols
The SS port-to-port protocol is built around three primary features:
- Link Flow Control
- Link Error Detection and Recovery
- Link Power Management
Link Training
Before any data transfer can occur, both link partners must establish a reliable connection through link training. This process uses Low-Frequency Periodic Signaling (LFPS) and Training Sequences (TS1/TS2).
Link Training Stages
| Stage | Purpose |
|---|---|
| Rx.Detect | Detect the presence of a far-end receiver |
| Polling | Exchange Training Sequences (TS1/TS2) to achieve bit lock, symbol lock, and lane polarity |
| U0 (Active) | Link is operational — normal packet traffic begins |
LFPS (Low-Frequency Periodic Signaling)
- A low-frequency out-of-band signaling mechanism used during:
- Connection detection (Rx.Detect)
- Link state transitions (e.g., waking from U1/U2/U3)
- Speed negotiation
- LFPS bursts are sent as simple square waves at ~20–40 MHz (much lower than the 5 Gbps data rate)
- Does not require the receiver to be trained or synchronized
Training Sequences (TS1 and TS2)
- TS1 — Sent to train the receiver: achieves bit alignment, symbol lock, and polarity detection
- TS2 — Sent after TS1 is received successfully; both partners exchange TS2 to confirm the link is ready
- Once both sides send and receive TS2, the link transitions to U0 (Active)
Link Flow Control
- Uses a credit-based flow control mechanism.
- Tracks buffer availability at the link partner.
- Operates bidirectionally, with each link partner advertising available credits to the other.
- Prevents buffer overflow and ensures smooth packet delivery.
How Credits Work
- Each link partner has a receive buffer capable of holding a fixed number of header packets.
- On link initialization, the receiver advertises its available buffer capacity as header credits.
- The transmitter decrements a credit for each header packet sent.
- The receiver sends a Link Credit Advertisement after processing a packet to return the credit.
- If credits reach zero, the transmitter must stop sending header packets until credits are replenished.
Note
Data Packet Payloads (DPP) do not consume separate credits — they are always associated with a DATA Header packet.
Link Error Detection and Recovery
- Verifies that each header packet is transferred successfully across the link.
- Ensures in-order delivery of header packets.
- Error handling behaviour depends on the error type:
- Automatic retries until successful transfer, or
- Link retraining after a specified timeout period.
Link Commands
Link-level communication uses Link Commands (LC), which are short 4-symbol packets used for:
| Link Command | Purpose |
|---|---|
| LGOOD_n | Acknowledges successful receipt of header packet n |
| LBAD | Indicates a header packet was received with errors |
| LCRD_x | Returns a credit to the transmitter |
| LGO_U | Requests a link state transition (e.g., to U1, U2, U3) |
| LAU | Accepts a link state transition request |
| LXU | Rejects a link state transition request |
| LPMA | Power management acknowledgment |
Header Sequence Numbers
- Each header packet carries a 3-bit sequence number (0–7).
- The receiver tracks expected sequence numbers to detect:
- Missing packets
- Duplicate packets
- Out-of-order delivery
- On error, the receiver sends LBAD, and the transmitter replays all unacknowledged header packets.
Recovery Escalation
- Retry — Transmitter replays unacknowledged packets (up to a retry limit)
- Link Retraining — If retries fail, the link returns to Recovery state to retrain
- Link Reset — If retraining fails, a full link reset may occur
Link Power Management
- SuperSpeed links support fine-grained power states: U0, U1, U2, U3 (see Power Management (SuperSpeed))
- Port-to-port protocols manage transitions between these states using link commands (LGO_U, LAU, LXU)
- Either link partner (upstream or downstream port) can initiate a transition to a lower-power state
- The partner can accept (LAU) or reject (LXU) the request
Summary
| Feature | Mechanism |
|---|---|
| Link Training | LFPS + TS1/TS2 ordered sets |
| Flow Control | Credit-based (header buffer credits) |
| Error Detection | CRC-16 on link commands, CRC-32 on header packets |
| Error Recovery | Retry → Retraining → Reset |
| Power Management | LGO_U / LAU / LXU link commands |